package com.lh.runmanage.unit;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;


@Component
@RefreshScope
public class GetPropertiesClass {
    @Value("${server.port}")
    private String port;
    @Value("${spring.application.name}")
    private String springApplicationName;
    @Value("${liangHaoSign}")
    private String liangHaoSign;
    @Value("${deleteMonths}")
    private int deleteMonths;
    @Value("${withMonths}")
    private int withMonths;

    /**
     * 同比月数
     * @return 同比月数
     */
    public int getWithMonths() {
        return withMonths;
    }

    public int getDeleteMonths() {
        return deleteMonths;
    }

    /**
     * 得到端口号
     *
     * @return
     */
    public String getPort() {
        return this.port;
    }

    /**
     * 得到微服务名称
     *
     * @return
     */
    public String getApplicationName() {
        return this.springApplicationName;
    }

    /**
     * 自定义测试标识
     *
     * @return
     */
    public String getLiangHaoSign() {
        return this.liangHaoSign;
    }
}
